/*
 * XML Type:  ServiceAdd
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.ServiceAdd
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML ServiceAdd(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class ServiceAddImpl extends net.ofx.types.x2003.x04.impl.AbstractServiceActionImpl implements net.ofx.types.x2003.x04.ServiceAdd
{
    
    public ServiceAddImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName BANKACCTTO$0 = 
        new javax.xml.namespace.QName("", "BANKACCTTO");
    private static final javax.xml.namespace.QName CCACCTTO$2 = 
        new javax.xml.namespace.QName("", "CCACCTTO");
    private static final javax.xml.namespace.QName INVACCTTO$4 = 
        new javax.xml.namespace.QName("", "INVACCTTO");
    private static final javax.xml.namespace.QName PRESACCTTO$6 = 
        new javax.xml.namespace.QName("", "PRESACCTTO");
    
    
    /**
     * Gets the "BANKACCTTO" element
     */
    public net.ofx.types.x2003.x04.BankAccount getBANKACCTTO()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BankAccount target = null;
            target = (net.ofx.types.x2003.x04.BankAccount)get_store().find_element_user(BANKACCTTO$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "BANKACCTTO" element
     */
    public boolean isSetBANKACCTTO()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(BANKACCTTO$0) != 0;
        }
    }
    
    /**
     * Sets the "BANKACCTTO" element
     */
    public void setBANKACCTTO(net.ofx.types.x2003.x04.BankAccount bankacctto)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BankAccount target = null;
            target = (net.ofx.types.x2003.x04.BankAccount)get_store().find_element_user(BANKACCTTO$0, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.BankAccount)get_store().add_element_user(BANKACCTTO$0);
            }
            target.set(bankacctto);
        }
    }
    
    /**
     * Appends and returns a new empty "BANKACCTTO" element
     */
    public net.ofx.types.x2003.x04.BankAccount addNewBANKACCTTO()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BankAccount target = null;
            target = (net.ofx.types.x2003.x04.BankAccount)get_store().add_element_user(BANKACCTTO$0);
            return target;
        }
    }
    
    /**
     * Unsets the "BANKACCTTO" element
     */
    public void unsetBANKACCTTO()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(BANKACCTTO$0, 0);
        }
    }
    
    /**
     * Gets the "CCACCTTO" element
     */
    public net.ofx.types.x2003.x04.CreditCardAccount getCCACCTTO()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.CreditCardAccount target = null;
            target = (net.ofx.types.x2003.x04.CreditCardAccount)get_store().find_element_user(CCACCTTO$2, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "CCACCTTO" element
     */
    public boolean isSetCCACCTTO()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(CCACCTTO$2) != 0;
        }
    }
    
    /**
     * Sets the "CCACCTTO" element
     */
    public void setCCACCTTO(net.ofx.types.x2003.x04.CreditCardAccount ccacctto)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.CreditCardAccount target = null;
            target = (net.ofx.types.x2003.x04.CreditCardAccount)get_store().find_element_user(CCACCTTO$2, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.CreditCardAccount)get_store().add_element_user(CCACCTTO$2);
            }
            target.set(ccacctto);
        }
    }
    
    /**
     * Appends and returns a new empty "CCACCTTO" element
     */
    public net.ofx.types.x2003.x04.CreditCardAccount addNewCCACCTTO()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.CreditCardAccount target = null;
            target = (net.ofx.types.x2003.x04.CreditCardAccount)get_store().add_element_user(CCACCTTO$2);
            return target;
        }
    }
    
    /**
     * Unsets the "CCACCTTO" element
     */
    public void unsetCCACCTTO()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(CCACCTTO$2, 0);
        }
    }
    
    /**
     * Gets the "INVACCTTO" element
     */
    public net.ofx.types.x2003.x04.InvestmentAccount getINVACCTTO()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InvestmentAccount target = null;
            target = (net.ofx.types.x2003.x04.InvestmentAccount)get_store().find_element_user(INVACCTTO$4, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "INVACCTTO" element
     */
    public boolean isSetINVACCTTO()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(INVACCTTO$4) != 0;
        }
    }
    
    /**
     * Sets the "INVACCTTO" element
     */
    public void setINVACCTTO(net.ofx.types.x2003.x04.InvestmentAccount invacctto)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InvestmentAccount target = null;
            target = (net.ofx.types.x2003.x04.InvestmentAccount)get_store().find_element_user(INVACCTTO$4, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.InvestmentAccount)get_store().add_element_user(INVACCTTO$4);
            }
            target.set(invacctto);
        }
    }
    
    /**
     * Appends and returns a new empty "INVACCTTO" element
     */
    public net.ofx.types.x2003.x04.InvestmentAccount addNewINVACCTTO()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.InvestmentAccount target = null;
            target = (net.ofx.types.x2003.x04.InvestmentAccount)get_store().add_element_user(INVACCTTO$4);
            return target;
        }
    }
    
    /**
     * Unsets the "INVACCTTO" element
     */
    public void unsetINVACCTTO()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(INVACCTTO$4, 0);
        }
    }
    
    /**
     * Gets the "PRESACCTTO" element
     */
    public net.ofx.types.x2003.x04.PresentmentAccount getPRESACCTTO()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PresentmentAccount target = null;
            target = (net.ofx.types.x2003.x04.PresentmentAccount)get_store().find_element_user(PRESACCTTO$6, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "PRESACCTTO" element
     */
    public boolean isSetPRESACCTTO()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(PRESACCTTO$6) != 0;
        }
    }
    
    /**
     * Sets the "PRESACCTTO" element
     */
    public void setPRESACCTTO(net.ofx.types.x2003.x04.PresentmentAccount presacctto)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PresentmentAccount target = null;
            target = (net.ofx.types.x2003.x04.PresentmentAccount)get_store().find_element_user(PRESACCTTO$6, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.PresentmentAccount)get_store().add_element_user(PRESACCTTO$6);
            }
            target.set(presacctto);
        }
    }
    
    /**
     * Appends and returns a new empty "PRESACCTTO" element
     */
    public net.ofx.types.x2003.x04.PresentmentAccount addNewPRESACCTTO()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PresentmentAccount target = null;
            target = (net.ofx.types.x2003.x04.PresentmentAccount)get_store().add_element_user(PRESACCTTO$6);
            return target;
        }
    }
    
    /**
     * Unsets the "PRESACCTTO" element
     */
    public void unsetPRESACCTTO()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(PRESACCTTO$6, 0);
        }
    }
}
